package com.sc.pb_user.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 兑换订单表
 * </p>
 *
 * @author PBObserver
 * @since 2025-09-19 05:02:16
 */
@Getter
@Setter
@TableName("pb_mall_order")
public class PbMallOrder {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 订单编号，唯一
     */
    @TableField("order_no")
    private String orderNo;

    /**
     * 逻辑外键，关联pb_user.id
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 逻辑外键，关联pb_mall_goods.id
     */
    @TableField("goods_id")
    private Long goodsId;

    /**
     * 消耗积分
     */
    @TableField("point")
    private Integer point;

    /**
     * 支付现金
     */
    @TableField("cash")
    private BigDecimal cash;

    /**
     * 状态：0-待审核，1-待发货，2-已发货，3-已完成，4-已取消
     */
    @TableField("status")
    private Boolean status;

    /**
     * 收货人姓名
     */
    @TableField("receiver_name")
    private String receiverName;

    /**
     * 收货人电话
     */
    @TableField("receiver_phone")
    private String receiverPhone;

    /**
     * 收货地址
     */
    @TableField("receiver_addr")
    private String receiverAddr;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 发货时间
     */
    @TableField("delivery_time")
    private Date deliveryTime;

    /**
     * 物流单号
     */
    @TableField("logistics_no")
    private String logisticsNo;
}
